package games.labirynth;

import hardware.Display2D;
import hardware.UI;

public class Labirynth {


private static Ball myBall = new Ball();	
private static Maze myMaze = new Maze();	


private static short mazeData[][]={{0,0x2aa8,0x2008,0x2208,0x2288,0x20b8,0x28a8,0}};


public boolean demo()
{

	myMaze.set(mazeData[0]);
	
	while(true)
	{

		Display2D.clear();

		
		
		myMaze.draw();

		myBall.draw();
		
		
		
		Display2D.doRepaint();
		
		
		
		if (UI.keyRUp())
			return(true);
		
		if (UI.keyRDown())
			return(false);
		
			
	}	
	

}
	






public void play() throws InterruptedException
{
	int level;
	level = 0;
	
	
	playLevel(level);
	
}





public void playLevel(int level) throws InterruptedException
{

	
	myMaze.set(mazeData[0]);
	
while(true)
	{
	Display2D.clear();

	
	
	
	
	
	myMaze.draw();

	myBall.draw();
	
	Display2D.doRepaint();
	
	
	
	

		Thread.sleep(100);

	
	}
	
}

	
private void checkMovement()
{
	if (UI.keyLLeft())
		{
		
		}
	else if (UI.keyLRight())
		{
			
		}
	
	if (UI.keyLUp())
		{
	
		}
	else if (UI.keyLDown())
		{
			
		}
		
}
	
}
